From: Richard M. Stallman Date: Fri, 28 May 1993 22:08:53 +0000 (+0000) Subject: (find-log-file): Use source file's truename dir. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~95839 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=411d5924a8ff01b45101ba178ab7e7021a987b7b;p=emacs.git (find-log-file): Use source file's truename dir. --- diff --git a/lisp/add-log.el b/lisp/add-log.el index 2c9170903d1..9b180566f70 100644 --- a/lisp/add-log.el +++ b/lisp/add-log.el @@ -54,6 +54,13 @@ Once a file is found, `change-log-default-name' is set locally in the current buffer to the complete file name." (or file-name (setq file-name (or change-log-default-name + ;; Chase links in the source file + ;; and use the change log in the dir where it points. + (and buffer-file-name + (let (temp (file buffer-file-name)) + (while (setq temp (file-symlink-p file)) + (setq file temp)) + (file-name-directory file))) default-directory))) (if (and (eq file-name change-log-default-name) (assq 'change-log-default-name (buffer-local-variables)))